projects
/
project
/
bcm63xx
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4d3b8a0
)
command.c: Fix auto-completion for the full commands list case
author
Andrew Gabbasov
<
[email protected]
>
Fri, 27 Dec 2013 16:05:14 +0000
(10:05 -0600)
committer
Tom Rini
<
[email protected]
>
Tue, 14 Jan 2014 14:01:05 +0000
(09:01 -0500)
Compiling of full list of commands does not advance the counter,
so it always results in an empty list.
This seems to be (inadvertently?) introduced by commit
6c7c946cadfafdea80eb930e3181085b907a0362
.
Signed-off-by: Andrew Gabbasov <
[email protected]
>
common/command.c
patch
|
blob
|
history
diff --git
a/common/command.c
b/common/command.c
index 625571dd4d895eb01d735e8c2aedfab0a388f4fa..597ab4cb4d83493e1c90d96a85da0669a48a4b8a 100644
(file)
--- a/
common/command.c
+++ b/
common/command.c
@@
-184,10
+184,10
@@
static int complete_cmdv(int argc, char * const argv[], char last_char, int maxv
/* output full list of commands */
for (; cmdtp != cmdend; cmdtp++) {
if (n_found >= maxv - 2) {
- cmdv[n_found] = "...";
+ cmdv[n_found
++
] = "...";
break;
}
- cmdv[n_found] = cmdtp->name;
+ cmdv[n_found
++
] = cmdtp->name;
}
cmdv[n_found] = NULL;
return n_found;